package pokerhelper.internals.BasicCalc;

public class BasicCalc {
	
	private int bigBlind;
	private int smallBlind;
	private int ante;
	private int nbPlayers;
	private int stackSize;
	
	private int costPerRound;
	private float nbRoundsLeft;

	public BasicCalc() {
		
		bigBlind = 20;
		smallBlind = 10;
		ante = 0;
		nbPlayers = 9;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		//TODO a test of the internals would be good here.
	}

	public void calc() {
		costPerRound = bigBlind + smallBlind + (nbPlayers*ante);
		nbRoundsLeft = (float)stackSize / (float)costPerRound;
	}

	public void set_bigBlind(int bigBlindIn) {
		this.bigBlind = bigBlindIn;
		calc();
	}

	public void set_nbPlayers(int nbPlayersIn) {
		this.nbPlayers = nbPlayersIn;
		calc();
	}

	public void set_ante(int anteIn) {
		this.ante = anteIn;
		calc();
	}

	public void set_smallBlind(int smallBlindIn) {
		this.smallBlind = smallBlindIn;
		calc();
	}
	
	

	public int get_nbPlayers() {
		return nbPlayers;
	}

	public int get_ante() {
		return ante;
	}

	public int getSmallBlind() {
		return smallBlind;
	}

	public int getBigBlind() {
		return bigBlind;
	}

	public float getNbRoundsLeft() {
		return nbRoundsLeft;
	}

}
